<!DOCTYPE html>
<html lang="zh-TW">
<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="content-language" content="zh-tw">
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, viewport-fit=cover">
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="imagetoolbar" content="false">
    <meta name="robots" content="noarchive" />
    @if(isset($layout['seo']))
        <title>{{ isset($layout['seo'])?$layout['seo']->title:"" }}</title>
    @else
        @hasSection('title')
            <title>@yield('title')</title>
        @else
            <title>{{ isset($layout['seo'])?$layout['seo']->title:"" }}</title>
        @endif
    @endif

    @hasSection('keywords')
        <meta name="keywords" content="@yield('keywords')"/>
    @else
        <meta name="keywords" content="{{ isset($layout['seo'])?$layout['seo']->key_word:"" }}"/>
    @endif

    @hasSection('description')
        <meta name="description" content="@yield('description')"/>
    @else
        <meta name="description" content="{{ isset($layout['seo'])?$layout['seo']->description:"" }}"/>
    @endif
    <style>
        :root{
            --main-background-color:rgba(0,0,0,1);
            --main-text-color:rgba(255,255,255,1);
            --main-btn-backgroud-color:rgba(255,255,255,1);
            --main-btn-text-color:rgba(0,0,0,1);
            --main-text-color2:rgba(255,255,255,0.75);
            --main-text-color3:rgba(255,255,255,0.45);
            --main-text-color4:rgba(255,255,255,0.2);
        }
    </style>

    <link rel="canonical" href="{{ config('app.url') }}/{{ trim(request()->path(),'/') }}">
    <link rel="shortcut icon" href="{{ \App\Services\ConfigService::get('favicon')?asset('uploads/'.\App\Services\ConfigService::get('favicon')):'/favicon.ico' }}">

    @section('style')
        <link rel="stylesheet" type="text/css" href="{{ asset('static/mobile/css/style.css') }}?v={{ app('cache.config')->get('asset_version') }}"/>
        <link rel="stylesheet" type="text/css" href="{{ asset('static/mobile/css/common.css') }}?v={{ app('cache.config')->get('asset_version') }}"/>
        <link rel="stylesheet" type="text/css" href="{{ asset('static/mobile/less/global.css') }}?v={{ app('cache.config')->get('asset_version') }}"/>
        <link rel="stylesheet" href="{{ asset('static/font/iconfont.css') }}?v={{ app('cache.config')->get('asset_version') }}">
    @show
    {{--<script src="{{ asset('static/mobile/js/less.min.js') }}"></script>--}}
    <link rel="stylesheet" href="{{ asset('static/swiper4/swiper.min.css') }}">
    <link rel="stylesheet" href="{{ asset('static/layer/mobile/need/layer.css') }}">
    <style>
        body {
            touch-action: manipulation;
        }
        .swiper-pagination{

            left: 50%;
            transform: translate(-50%,0);
        }
        .swiper-pagination-bullet-active{
            background: #000;
        }
        .swiper-pagination-bullet{
            margin-left: 20px;
        }
        .swiper-pagination-bullet:first-child{
            margin: 0;
        }
        .u-flyer{
            z-index:999;
        }
        .swiper-container{
            margin: 0 auto;
        }
        .banner{
            margin: 0;
        }
        .ui-effects-wrapper{
            float:right!important;
            width: fit-content!important;
        }
        body{
            -moz-user-select:none; /* Firefox私有属性 */
            -webkit-user-select:none; /* WebKit内核私有属性 */
            -ms-user-select:none; /* IE私有属性(IE10及以后) */
            -khtml-user-select:none; /* Khtml内核私有属性 */
            -o-user-select:none; /* Opera私有属性 */
            user-select:none; /* CSS3属性 */
        }
        img{
            -webkit-user-drag: none;
        }

        body .layui-m-layer .layui-m-layer-msg{
            background-color: #fff;
            color: #000;
            font-size: 0.36rem;
        }
    </style>


    <script src="{{ asset('static/js/jquery.min.js') }}"></script>
    <script src="{{ asset('static/swiper4/swiper.min.js') }}"></script>
    <script src="{{ asset('static/js/jquery.cookie.js') }}"></script>

    {{--<script src="{{ asset('static/mobile/js/menu.js') }}?v={{ app('cache.config')->get('asset_version') }}"></script>--}}
    <script src="{{ asset('static/mobile/js/rem.js') }}?v={{ app('cache.config')->get('asset_version') }}"></script>


    <script>



        var is_ajax_get_cart = 0;
        var flash_data = '{!! session()->get('flash') !!}';
        if(flash_data){
            flash_data = JSON.parse('{!! session()->get('flash') !!}');

        }else{
            flash_data = false;
        }

        var province = [];

        var free_shipping_where = parseInt("{{ \App\Services\ConfigService::get('freight_where',0) }}");
        var free_shipping_freight = parseInt("{{ \App\Services\ConfigService::get('freight',0) }}");

        function decrement_full(price){
            var decrement_deal = '{!! json_encode(\App\Services\DecrementService::regroup()) !!}';
            var discount = {is:0};
            if(decrement_deal){
                var decrement = JSON.parse(decrement_deal);
                var discount_price = 0;

                for (let key in decrement){
                    if(price >= key){
                        discount_price = decrement[key];
                        discount.discount_price = discount_price;
                        discount.condition = key;
                        discount.is = 1;
                        discount.total_price = price - discount_price;
                    }
                }


            }

            return discount;
        }


    </script>

</head>
<body>

@section('header')
    <section class="header-section">
    <header class="header {{ isset($layout_header) && $layout_header == 1?"header2":"" }}">
        <div class="top">
            <div class="menu-icon">
                <div class="icon-item"><a href="javascript:;" onclick="showMenu()"><i class="iconfont cart-icon">&#xe630;</i></a></div>
            </div>
            <div class="logo-box">
                <a href="/"><img class="logo alogo" src="{{ asset_upload(app('cache.config')->get('logo'))  }}" alt="LOGO"></a>
            </div>
            <div class="icon-box clearfix">
                <div class="icon-item"><a href="javascript:showCart();" id="cart-show-box"><i class="iconfont cart-icon">&#xe652;</i><span id="header-cart-count" class="header-cart-count">0</span></a></div>

            </div>
        </div>

    </header>
    </section>
@show






@section('banner')
    @if(isset($layout['banner']) && count($layout['banner']) > 0)

    <div class="banner swiper-container" id="banner" >
        <div class="swiper-wrapper">
            @foreach($layout['banner'] as $item)

                @if($item->m_img)
                    <div class="swiper-slide"><a href="{{ $item->href }}" class="swiper-slide-click"><img alt="{{ $item->alt }}" src="{{ asset("uploads/".$item->m_img) }}" /></a></div>
                @endif

            @endforeach
        </div>

    </div>

    @endif
@show





@yield('content')

@section('footer')
<section class="footer-section">

    <div class="content-top">
        <div class="blocks-wrapper">
            <div class="block-grid">
                <div class="navigator">
                    <p class="title">SHOP</p>
                    <ul>
                        <li><a href="{{ url('product') }}">ILIA哩亞拋棄式</a></li>
                        <li><a href="{{ url('pods') }}">ILIA哩亞煙彈</a></li>
                        <li><a href="{{ url('host') }}">ILIA哩亞主機</a></li>

                    </ul>
                </div>
            </div>
            <div class="block-grid">
                <div class="navigator">
                    <p class="title">ABOUT</p>
                    <ul>
                        <li><a href="{{ url('guide') }}">訂購指南</a></li>
                        <li><a href="{{ url('news') }}">ILIA資訊</a></li>
                        <li><a href="{{ url('check') }}">訂單查詢</a></li>
                        <li><a href="{{ url('message') }}">聯繫我們</a></li>

                    </ul>
                </div>
            </div>
            <div class="block-grid">
                <div class="mission">
                    <p class="title">Our mission</p>
                    <p class="desc">
                        @if(\App\Services\ConfigService::get('about_text')){!! str_replace(PHP_EOL,'，',\App\Services\ConfigService::get('about_text')) !!}@endif
                    </p>
                </div>
            </div>

        </div>
    </div>
    <div class="content-bottom">
        <p class="copyright">{{ \App\Services\ConfigService::get('copyright') }}</p>
    </div>


</section>
@show

@section('footer-menu')

    <div class="support-footer"></div>
    <footer class="fixed-footer">
        <div class="menu-item">
            <a href="{{ url('/') }}">
                <div class="icon-box"><i class="iconfont">&#xe654;</i></div>
                <p>首頁</p>
            </a>
        </div>
        <div class="menu-item">
            <a href="{{ url('product') }}">
                <div class="icon-box"><i class="iconfont">&#xe9f9;</i></div>
                <p>ILIA拋棄式</p>
            </a>
        </div>
        <div class="menu-item">
            <a href="{{ url('pods') }}" >
                <div class="icon-box"><i class="iconfont">&#xe863;</i></div>
                <p>ILIA煙彈</p>
            </a>
        </div>
        <div class="menu-item">
            <a href="{{ url('host') }}">
                <div class="icon-box"><i class="iconfont">&#xe6b3;</i></div>
                <p>ILIA主機</p>
            </a>
        </div>
        <div class="menu-item">
            <a href="javascript:showCart();" data-observer="打開購物袋">
                <div class="icon-box"><i class="iconfont">&#xe652;</i><span id="menu-cart-count" class="menu-cart-count">0</span></div>
                <p>購物袋</p>
            </a>
        </div>
    </footer>
@show

@section('menu')
    <section class="menu-section">
        <div class="menu-head">
            <a href="/"><img style="align-self: center;width: 1.2rem;opacity: 1" class="logo alogo" src="{{ \App\Services\ConfigService::get('logo')?asset('uploads/'.\App\Services\ConfigService::get('logo')):asset('static/img/logo.png') }}" alt="LOGO"></a>
            <a href="javascript:;" onclick="closeMenu()"><i class="iconfont">&#xe608;</i></a>
        </div>
        <ul class="menu">
            <li>
                <a href="{{ url('/') }}"><span class="text">首頁</span><i class="iconfont">&#xe6e0;</i></a>
            </li>
            <li>
                <a href="{{ url('product') }}"><span class="text">ILIA拋棄式</span><i class="iconfont">&#xe6e0;</i></a>
            </li>
            <li>
                <a href="{{ url('pods') }}"><span class="text">ILIA煙彈</span><i class="iconfont">&#xe6e0;</i></a>
            </li>
            <li>
                <a href="{{ url('host') }}"><span class="text">ILIA主機</span><i class="iconfont">&#xe6e0;</i></a>
            </li>
            <li>
                <a href="{{ url('guide') }}"><span class="text">訂購指南</span><i class="iconfont">&#xe6e0;</i></a>
            </li>
            <li>
                <a href="{{ url('news') }}"><span class="text">ILIA資訊</span><i class="iconfont">&#xe6e0;</i></a>
            </li>
            <li>
                <a href="{{ url('check') }}"><span class="text">訂單追蹤</span><i class="iconfont">&#xe6e0;</i></a>
            </li>
            <li>
                <a href="{{ url('message') }}"><span class="text">取得協助</span><i class="iconfont">&#xe6e0;</i></a>
            </li>

        </ul>
    </section>
    <div class="menu-shade" onclick="closeMenu()"></div>
@show
<cart-drawer class="drawer" id="cart-drawer">
    <div class="_overlay" onclick="closeCart()"></div>
    <div class="_inner">
        <div class="heading">
            <p class="text"><i class="iconfont">&#xe652;</i>購物袋</p>
            <button class="_close" onclick="closeCart()"><i class="iconfont">&#xe608;</i></button>
        </div>
        <div class="_contents">

        </div>
        <div class="footing">
            <div class="totals" role="status">
                <p class="_subtotal">商品小計</p>
                <p class="_subtotal-value">NT$ <span id="apex-cart-goods-price">0</span></p>
            </div>
            <div class="totals" role="status">
                <p class="_subtotal">運費</p>
                <p class="_subtotal-value">NT$ <span id="apex-cart-freight-price">0</span></p>
            </div>
            <div class="totals" role="status" id="apex-cart-discount-row">
                <p class="_subtotal">滿減優惠</p>
                <p class="_subtotal-value">-NT$ <span id="apex-cart-discount">0</span></p>
            </div>
            <div class="totals" role="status">
                <p class="_subtotal">訂單總額</p>
                <p class="_subtotal-value">NT$ <span id="apex-cart-total-price">0</span></p>
            </div>
            <a class="_checkout-btn" href="javascript:;" data-observer="購物袋-安全結賬">安全結帳</a>
        </div>
    </div>
</cart-drawer>
</body>
@section('script')

<script src="{{ asset('static/layer/mobile/layer.js') }}"></script>
<script src="{{ asset('static/js/observer.js') }}"></script>
<script src="{{ asset('static/js/cart.js') }}?v={{ app('cache.config')->get('asset_version') }}"></script>
<script src="{{ asset('static/mobile/js/xie.js') }}?v={{ app('cache.config')->get('asset_version') }}"></script>
<script>
    computeCartBoxHeight();

    $(window).resize(function () {
        computeCartBoxHeight();
    });

    function computeCartBoxHeight(){
        var height = $(window).height() - $('#cart-drawer .heading').outerHeight() - $('#cart-drawer .footing').outerHeight();
        $('#cart-drawer ._contents').css('height',height+'px')
    }
@if(isset($layout['banner']) && count($layout['banner']) > 1)
    var BannerSwiper = new Swiper('#banner',{
        loop:true,
        autoplay : 3000,
        autoplayDisableOnInteraction:false,
        grabCursor : true,
        observer:true,
    })
@endif

$(document).scroll(function() {
    var scroH = $(document).scrollTop();  //滚动高度



    if(scroH >20){  //距离顶部大于100px时
        $('header').addClass('scroll-header')
    }else{
        $('header').removeClass('scroll-header')
    }

});
</script>
    {!! \App\Services\ConfigService::get('google_ga') !!}


<script>
    function showMenu(){
        $('.menu-section').addClass('show');
        $('.menu-shade').addClass('show');
    }
    function closeMenu(){
        $('.menu-section').removeClass('show');
        $('.menu-shade').removeClass('show');
    }
</script>
<script>
    $(function () {
        $('img').attr('oncontextmenu','return false;');
    })
</script>
<script>
    document.addEventListener('gesturestart', function (e) {
        e.preventDefault();
    });
</script>
@show
</html>
